import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/pub/user/login3',
    method: 'post',
    data
  })
}

export function check() {
  return request({
    url: '/user/check',
    method: 'post'
  })
}

export function getInfo(data) {
  return request({
    url: '/admin/info',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}

export function updatePassWord(data) {
  return request({
    url: '/admin/update/password',
    method: 'post',
    data
  })
}

export function reg(data) {
  return request({
    url: '/pub/user/reg',
    method: 'post',
    data
  })
}

export function reg2(data) {
  return request({
    url: '/pub/user/reg2',
    method: 'post',
    data
  })
}
export function regAgent(data) {
  return request({
    url: '/pub/user/reg3',
    method: 'post',
    data
  })
}

export function code(data) {
  return request({
    url: '/pub/sms/send',
    method: 'post',
    data
  })
}

export function getForgetCodeWork(data) {
  return request({
    url: '/pub/sms/send2',
    method: 'post',
    data
  })
}
export function workCodeLogin(data) {
  return request({
    url: '/pub/user/reset',
    method: 'post',
    data
  })
}
export function resetPasswordWork(data) {
  return request({
    url: '/user/update/password',
    method: 'post',
    data
  })
}

export function updateMobile(data) {
  return request({
    url: '/admin/update/mobile',
    method: 'post',
    data
  })
}

export function getForget(data) {
  return request({
    url: '/pub/mail/send',
    method: 'post',
    data
  })
}
